Integrand size = 41, antiderivative size = 221 \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 C \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (3+2 n)}-\frac {2 (C+2 C n+A (3+2 n)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-2 n) (3+2 n) \sqrt {\sec (c+d x)} \sqrt {\sin ^2(c+d x)}}+\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-1-2 n),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {20, 4132, 3857, 2722, 4131} \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 (A (2 n+3)+2 C n+C) \sin (c+d x) (b \sec (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right )}{d (1-2 n) (2 n+3) \sqrt {\sin ^2(c+d x)} \sqrt {\sec (c+d x)}}+\frac {2 B \sin (c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-2 n-1),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right )}{d (2 n+1) \sqrt {\sin ^2(c+d x)}}+\frac {2 C \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n}{d (2 n+3)} \]
[In]
[Out]
Rule 20
Rule 2722
Rule 3857
Rule 4131
Rule 4132
Rubi steps \begin{align*} \text {integral}& = \left (\sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {1}{2}+n}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx \\ & = \left (\sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {1}{2}+n}(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx+\left (B \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {3}{2}+n}(c+d x) \, dx \\ & = \frac {2 C \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (3+2 n)}+\left (B \cos ^{\frac {1}{2}+n}(c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n\right ) \int \cos ^{-\frac {3}{2}-n}(c+d x) \, dx+\frac {\left (\left (C \left (\frac {1}{2}+n\right )+A \left (\frac {3}{2}+n\right )\right ) \sec ^{-n}(c+d x) (b \sec (c+d x))^n\right ) \int \sec ^{\frac {1}{2}+n}(c+d x) \, dx}{\frac {3}{2}+n} \\ & = \frac {2 C \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (3+2 n)}+\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-1-2 n),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) \sqrt {\sin ^2(c+d x)}}+\frac {\left (\left (C \left (\frac {1}{2}+n\right )+A \left (\frac {3}{2}+n\right )\right ) \cos ^{\frac {1}{2}+n}(c+d x) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n\right ) \int \cos ^{-\frac {1}{2}-n}(c+d x) \, dx}{\frac {3}{2}+n} \\ & = \frac {2 C \sec ^{\frac {3}{2}}(c+d x) (b \sec (c+d x))^n \sin (c+d x)}{d (3+2 n)}-\frac {2 (C+2 C n+A (3+2 n)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-2 n) (3+2 n) \sqrt {\sec (c+d x)} \sqrt {\sin ^2(c+d x)}}+\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-1-2 n),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 2.50 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.92 \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \csc (c+d x) (b \sec (c+d x))^n \left (A \left (15+16 n+4 n^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1+2 n),\frac {1}{4} (5+2 n),\sec ^2(c+d x)\right )+(1+2 n) \left (B (5+2 n) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (3+2 n),\frac {1}{4} (7+2 n),\sec ^2(c+d x)\right )+C (3+2 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (5+2 n),\frac {1}{4} (9+2 n),\sec ^2(c+d x)\right )\right ) \sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}}{d (1+2 n) (3+2 n) (5+2 n) \sqrt {\sec (c+d x)}} \]
[In]
[Out]
\[\int \left (b \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )+C \sec \left (d x +c \right )^{2}\right ) \sqrt {\sec \left (d x +c \right )}d x\]
[In]
[Out]
\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int {\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \]
[In]
[Out]